<template>
  <div>
    <div id="wx_reg" v-show="showflag" style="height:2rem;"></div>
    <remote-js src="http://rescdn.qqmail.com/node/ww/wwopenmng/js/sso/wwLogin-1.0.0.js"></remote-js>
    <div @click="show">展示二维码</div>
  </div>
</template>
<script>
export default {
  components: {
    "remote-js": {
      render(createElement) {
        return createElement("script", {
          attrs: {
            type: "text/javascript",
            src: this.src
          }
        });
      },
      props: {
        src: { type: String, required: true }
      }
    }
  },
  data() {
    return {
        showflag:false
    };
  },
  methods: {
    show() {
    
      this.showflag=true
      window.WwLogin({
        id: "wx_reg",
        appid: "",
        agentid: "",
        redirect_uri: "",
        state: "",
        href: ""
      });
    }
  },
//   mounted() {
//     this.show();
//   }
};
</script>
<style    scoped>
</style>
